package com.scpii.universal.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

import com.scpii.universal.Const.CompileConfig;

public class CompileConfigUtil {

	private Properties prop;

	private static final String RELATIVELY_PATH = System
			.getProperty("user.dir");

	public CompileConfigUtil() throws Exception {
		InputStream mStream = new FileInputStream(new File(RELATIVELY_PATH
				+ File.separator + "config" + File.separator
				+ "compile.properties"));
		prop = new Properties();
		prop.load(mStream);
	}

	/**
	 * load config
	 */
	public void load() {
		CompileConfig.SERVER_URL = prop.getProperty("SERVER_URL");
		CompileConfig.TASK_POOL_SIZE = prop.getProperty("TASK_POOL_SIZE");
	}
}
